import { ViewLayer, ViewMode } from "../../../../framework/view/ViewConsts";
import { ViewCtrlBase } from "../../../../framework/view/ViewCtrlBase";
import ViewPageViewDemo from "../view/ViewPageViewDemo";


export default class VCPageViewDemo extends ViewCtrlBase {
    public static viewName: string = "ViewPageViewDemo";
    public static viewMode: ViewMode = ViewMode.SINGLE;
    public viewLayer: ViewLayer = ViewLayer.Layer_Scene;
    public viewClass: (typeof ViewPageViewDemo) = ViewPageViewDemo;


    data:{txt:string}[] = []
    data2:{txt:string}[] = []
    initData(data?:any){
        for (let i = 0; i < 100; i++) {
            let one = {
                txt: `ListView_${i}`
            }
            this.data.push(one);
        }
        for (let i = 0; i < 100; i++) {
            let one = {
                txt: `ListView_2_${i}`
            }
            this.data2.push(one);
        }
    }
    onOpen(){
        super.onOpen();
        this.initData();
    }


    onClose(){
        super.onClose();
    }
    /**注册系统事件 */
    registEvent(): void {
        
    }
}